<?php

use think\facade\Route;
use app\common\middleware\AdminAuthMiddleware;
use app\common\middleware\AdminTokenMiddleware;
use app\common\middleware\AllowOriginMiddleware;
use app\common\middleware\LogMiddleware;

Route::group(function () {


    Route::group('wo/recruit', function () {

        Route::get('lst', '/lst')->name('systemRecruitLst')->option([
            '_alias' => '列表 ',
        ]);

        Route::post('create', '/create')->name('systemRecruitCreate')->option([
            '_alias' => '添加',
        ]);
        Route::post('update/:id', '/update')->name('systemRecruitUpdate')->option([
            '_alias' => '编辑',
        ]);
        Route::post('status/:id', '/switchStatus')->name('systemRecruitStatus')->option([
            '_alias' => '编辑状态',
        ]);
        Route::get('detail/:id', '/detail')->name('systemRecruitDetail')->option([
            '_alias' => '详情',
        ]);
        Route::delete('delete/:id', '/delete')->name('systemRecruitDelete')->option([
            '_alias' => '删除',
        ]);

    })->prefix('admin.system.recruit.Recruit')->option([
        '_path' => '/setting/recruit/recruit/list',
        '_auth' => true,
    ]);

    })->middleware(AllowOriginMiddleware::class)
    ->middleware(AdminTokenMiddleware::class, true)
    ->middleware(AdminAuthMiddleware::class)
    ->middleware(LogMiddleware::class);
